$OpenBSD: patch-Makefile_defs,v 1.5 2013/04/16 11:13:04 sthen Exp $
--- Makefile.defs.orig	Mon Mar 11 17:27:19 2013
+++ Makefile.defs	Thu Mar 14 15:52:28 2013
@@ -362,9 +362,9 @@ ppc_macros= __powerpc __powerpc__ __POWERPC__ __ppc__ 
 ppc64_macros= __ppc64__ _ARCH_PPC64
 
 mips_macros= __mips__ __mips _MIPS_ARCH_MIPS1
-mips2_macros= _MIPS_ISA_MIPS2 _MIPS_ISA_MIPS3 _MIPS_ISA_MIPS4 \
+mips2_macros= _MIPS_ISA_MIPS2 _MIPS_ISA_MIPS4 \
 			_MIPS_ARCH_MIPS2 _MIPS_ARCH_MIPS3 _MIPS_ARCH_MIPS4
-mips64_macros= _MIPS_ISA_MIPS64 _MIPS_ARCH_MIPS64
+mips64_macros= _MIPS_ISA_MIPS64 _MIPS_ARCH_MIPS64 _MIPS_ISA_MIPS3
 
 alpha_macros= __alpha__ __alpha _M_ALPHA_
 
@@ -435,7 +435,7 @@ endif
 endif
 
 # dirs
-cfg_dir = etc/$(MAIN_NAME)/
+cfg_dir = share/examples/$(MAIN_NAME)/
 bin_dir = sbin/
 share_dir = share/$(MAIN_NAME)/
 # lib/$(MAIN_NAME)/modules , lib/$(MAIN_NAME)/modules-s, lib/$(MAIN_NAME)/modules-k
@@ -517,7 +517,7 @@ data_prefix = $(basedir)$(prefix)
 
 
 # target dirs for various stuff
-cfg_target = $(prefix)/$(cfg_dir)
+cfg_target = $(SYSCONFDIR)/$(MAIN_NAME)/
 bin_target = $(prefix)/$(bin_dir)
 #modules_target = $(prefix)/$(modules_dir)
 lib_target = $(prefix)/$(lib_dir)
@@ -976,7 +976,7 @@ ifeq	($(ARCH), x86_64)
 ifeq		($(CC_NAME), gcc)
 				C_DEFS+=-DCC_GCC_LIKE_ASM
 				#common stuff
-				CFLAGS=-g -O9 -funroll-loops  -Wcast-align $(PROFILE)
+				CFLAGS=
 			#if gcc 4.5+
 			# don't add '-mtune=$(CPU)' - gcc failure
 ifeq			($(CC_SHORTVER), 4.5+)
@@ -990,12 +990,8 @@ else
 			#if gcc 4.2+
 ifeq			($(CC_SHORTVER), 4.2+)
 $(call				set_if_empty,CPU,opteron)
-					CFLAGS+=-m64 -minline-all-stringops \
-							-falign-loops \
-							-ftree-vectorize \
-							-fno-strict-overflow \
-							-mtune=$(CPU)
-					LDFLAGS+=-m64
+					CFLAGS+=
+					LDFLAGS+=
 else
 			#if gcc 4.0+
 ifeq			($(CC_SHORTVER), 4.x)
@@ -1416,7 +1412,7 @@ ifeq		($(CC_NAME), gcc)
 				CFLAGS= -mips64 -O9 -funroll-loops $(PROFILE)
 			#if gcc 4.5+ or 4.2+
 ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
-					CFLAGS+=-minline-all-stringops -ftree-vectorize \
+					CFLAGS+=-ftree-vectorize \
 							-fno-strict-overflow
 else
 			#if gcc 4.0+
@@ -1962,9 +1958,10 @@ endif
 
 ifeq ($(OS), openbsd)
 	C_DEFS+=-DHAVE_SOCKADDR_SA_LEN  -DHAVE_GETHOSTBYNAME2 \
-		-DHAVE_UNION_SEMUN -DHAVE_MSGHDR_MSG_CONTROL \
-		-DHAVE_CONNECT_ECONNRESET_BUG -DHAVE_TIMEGM \
-		-DHAVE_NETINET_IN_SYSTM -DUSE_SIGWAIT
+		-DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD \
+		-DHAVE_MSGHDR_MSG_CONTROL -DHAVE_CONNECT_ECONNRESET_BUG \
+		-DHAVE_TIMEGM -DHAVE_NETINET_IN_SYSTM \
+		-DUSE_SIGWAIT
 	ifneq ($(found_lock_method), yes)
 		C_DEFS+= -DUSE_PTHREAD_MUTEX  # try pthread sems
 		found_lock_method=yes
